var http = require("../../../utils/httpUtils.js")
var app = getApp()
Page({

  /**
   * 页面的初始数据
   */
  data: {
    dataInfo:{}
  },

  getData: function () {
    http.G(app.globalData.SERVER_IP +'/user/user_center/u_id/' + wx.getStorageSync('userInfo').userid,{},(res)=>{
      let informationData = res.result
      console.log(informationData)
			this.setData({
        dataInfo: informationData
      })
		},(err)=>{
			console.log("222222222222")
			console.log(err)
		})
  },
  onLoad: function (options) {
    wx.setNavigationBarTitle({
      title: '个人中心',
    })
    this.getData()
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {
		wx.hideShareMenu({
		})
  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  },
  go_feedback:function(){
    wx.navigateTo({
      url: '/pages/user_center/question_feedback/question_feedback'
    })
  },
  go_collections:function(){
    wx.navigateTo({
      url: "/pages/user_center/my_collection/my_collection"
    })
  },
  go_coupons:function(){
    wx.navigateTo({
      url: "/pages/user_center/my_coupon/my_coupon"
    })
  },
  go_browse_record:function(){
    wx.navigateTo({
      url: "/pages/user_center/browse_record/browse_record"
    })
  },
  go_setting:function(){
    wx.navigateTo({
      url: "/pages/user_center/setting_center/setting_center"
    })
  },
  go_my_order:function(){
    wx.navigateTo({
      url: "/pages/user_center/my_order/my_order"
    })
  },
  go_waiting_pay:function(e){
    wx.navigateTo({
      url: "/pages/user_center/my_order/my_order?current_data="+e.currentTarget.dataset.current_data
    })
  },
  go_refund_order:function(){
    wx.navigateTo({
      url: "/pages/user_center/refund_order/refund_order"
    })
  }
}) 